Skip to content

fix/#652#668

Open
vbhavh wants to merge 6 commits intoapache:mainfrom
vbhavh:main
Open

fix/#652#668
vbhavh wants to merge 6 commits intoapache:mainfrom
vbhavh:main

Conversation

@vbhavh
Copy link

@vbhavh vbhavh commented Mar 3, 2026

fix of issue: #652

Changes:
type(model).model_fields accesses the attribute on the class, which is the correct way per Pydantic v2.11+.

@skrawcz
Copy link
Contributor

skrawcz commented Mar 6, 2026

this needs minimum pin in pyproject.toml to accompany this

@vbhavh
Copy link
Author

vbhavh commented Mar 6, 2026

@skrawcz done.

@skrawcz
Copy link
Contributor

skrawcz commented Mar 6, 2026

@vbhavh I think we want it for all pydantic dependencies in pyproject.toml.

@vbhavh
Copy link
Author

vbhavh commented Mar 8, 2026

hey @skrawcz, is it solved now ? I have done it for all pydantic deps.

@elijahbenizzy
Copy link
Contributor

Could we add a test that confirms this?

@vbhavh
Copy link
Author

vbhavh commented Mar 13, 2026

Could we add a test that confirms this?

i'll add one in test/integrations.

@vbhavh
Copy link
Author

vbhavh commented Mar 14, 2026

@elijahbenizzy done.

Comment on lines +137 to +142
def test_pydantic_version():
"""Ensure pydantic >= 2.11 is installed (required for class-level model_fields access)."""
from packaging.version import Version
assert float(float(".".join(pydantic.__version__.split(".")[:2]))) >= float("2.11"), (
f"pydantic >= 2.11 required, got {pydantic.__version__}"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elijahbenizzy you didn't mean this right ?

What type of test were you looking for? I think the existing unit tests should have covered things?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants